# Maintainer: David Runge <dvzrv@archlinux.org>

pkgname=python-osc
pkgver=1.8.1
pkgrel=2
pkgdesc='Open Sound Control server and client implementations in pure Python'
arch=(any)
url="https://github.com/attwad/python-osc"
license=(Unlicense)
depends=(python)
makedepends=(python-build python-installer python-setuptools python-wheel)
checkdepends=(python-pytest)
source=(https://files.pythonhosted.org/packages/source/${pkgname::1}/$pkgname/$pkgname-$pkgver.tar.gz)
sha512sums=('a273a952b20b26131e5dd7b076949a2d72c9cf8ac85f1d5a39e98e6169df7bee2e269301861e1ffb083b4900861e2af01c5a0dc2e59758dfce5a73bbd38e13ea')
b2sums=('6d68856e8fda2f1a7b7c61b9ea48aa619d6ac75fd49c79c85fb1fcabdaad3858bf0ac1655dc1531bf8f3131aed1f654d7dbd134d7e2c76cceb3fd78decaff267')

build() {
  cd $pkgname-$pkgver
  python -m build --wheel --no-isolation
 }

check() {
  cd $pkgname-$pkgver
  pytest -v
}

package() {
  cd $pkgname-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -vDm 644 README.rst -t "$pkgdir/usr/share/doc/$pkgname/"
}
